<?php 
	$where = '';
	if($_GET['label']) {$label = $_GET['label'];$where .= "&label=" . $label;}
	if($_GET['city']) {$city = $_GET['city'];$where .= "&city=" . urlencode($city);}
	if($_GET['people']) {$people = $_GET['people'];$where .= "&people=" . $people;}
	if($_GET['letter']) {$letters = $_GET['letter'];$where .= "&letter=".$letters;}
	if($_GET['title']) {$title = $_GET['title'];$where .= "&name=".urlencode($title);}
	$wheres = urlencode($where);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}--手机站</title>
		<meta name="Keywords" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚" />
    	<meta name="description" content="中国小姐,世界小姐,世界小姐中国区,新丝路,新丝路时尚" />
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
	    <meta http-equiv="pragma" content="no-cache">
	    <meta http-equiv="Cache-Control" content="no-cache;must-revalidate" />
	    <meta http-equiv="expires" content="0" />
	    <meta name="keywords" content="" />
		<meta name="description" content=""/>
		<link href="{JS_PATH}/nsrmodel_h5/css/reset.css" type="text/css" rel="stylesheet"/>
		<link href="{JS_PATH}/nsrmodel_h5/css/list_templet.css" type="text/css" rel="stylesheet"/>
		<link href="{JS_PATH}/nsrmodel_h5/css/modellist.css" type="text/css" rel="stylesheet"/>
		<link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel_h5/css/xsl_lc_m.css">
		<script src="{JS_PATH}/nsrmodel_h5/js/jquery.1.7.2.min.js"></script>
		<script src="{JS_PATH}/nsrmodel_h5/js/html_reset.js"></script>
		<link rel="stylesheet" type="text/css" href="{JS_PATH}/nsrmodel/css/swiper.min.css">
		<script type="text/javascript">
			$(function(){
				//点击事件
				$('#city .spans').click(function(){
					var citys = $(this).attr('value');
					var label = '{$label}';
					var url = "index.php?m=content&c=index&a=lists&catid={$catid}";
					if (label) {
						url += "&label="+label;
					}
					if (citys) {
						url += "&city="+citys;
					}
					window.location.href = url;
				})
				$('#people .spans').click(function(){
					var peoples = $(this).attr('value');
					var label = '{$label}';
					var url = "index.php?m=content&c=index&a=lists&catid={$catid}";
					if (label) {
						url += "&label="+label;
					}
					if (peoples) {
						url += "&people="+peoples;
					}
					window.location.href = url;
				})
				$('#letter .spans').click(function(){
					var letters = $(this).attr('value');
					var label = '{$label}';
					var url = "index.php?m=content&c=index&a=lists&catid={$catid}";
					if (label) {
						url += "&label="+label;
					}
					if (letters) {
						url += "&letter="+letters;
					}
					window.location.href = url;
				})

				//点击提交
				$('#click_submit').click(function(){
					var url = "index.php?m=content&c=index&a=lists&catid={$catid}";
					var title = $('#title').val();
					var label = '{$label}';
					if (label) {
						url += "&label="+label;
					}
					if (title) {
						url += "&title="+title;
					}
					window.location.href = url;
				})
			})
		</script>
		<script type="text/javascript">
        $(function(){
        	var where = "{$wheres}";
        	var catid = '{$catid}';
        	var num = 10;
            var tag = 1;
            var nums = $('#sis-li li').size();
            if (nums != 10) {
                tag = 0;
            }
            var page = 1;
            $(window).scroll(function(){  
                // 被卷去的高度  
                var scrollTop = document.body.scrollTop||document.documentElement.scrollTop;  
                // 页面高度  
                var pageHeight = $(document).height();  
                // 可视区域高度  
                var viewHeight = $(window).height();  
                //alert(viewHeight);  
                //当滚动到底部时  
                if((scrollTop+viewHeight)>(pageHeight-20) && tag == 1){
                    tag = 0;
                    page++;
                    $.ajax({
                        type: "post",
                        url: "?m=content&c=rjson&a=apiList",
                        cache: false,
                        dataType:"json",
                        data: {page:page,where:where,catid:catid,pagesize:num,type:4},
                        success: function(result){
                            if (result) {
                                var nummer = 0;
                                var _html = '';
                                $.each( result['data']['talentList'], function(i, n){
                                	nummer++;
                                    _html += '<li><span class="v1"><a href="';
                                    _html += '/index.php?m=content&c=index&a=show&type=4&catid='+catid+'&id='+n.id;
                                    _html += '"><img src="';
                                    _html += n.imageVertical;
                                    _html += '"><p>';
                                    _html += n.realName;
                                    _html += '</p></a></span></li>';
                                });
                                if (nummer == 10) {
                                    tag = 1;
                                } else {
                                    tag = 0;
                                }
                                $('#sis-li').append(_html);
                            } else {
                                tag = 0;
                            }
                        },
                        error: function(){
                          alert('请求服务器失败');
                        }
                    }); 
                    //防止无限制的增长
                    if(scrollTop<1000){  
                        return false;     
                    }  
                }  
            });
        })
    </script>
	</head>
	<body class="body-miss-list">
	{template "content_h5","header"}
	<div class="top-area">

		<img class="banner" src="http://m.nsr.com.cn/resource/uploadfile/column_icon/m19.jpg" />
	</div>
		<div class="nav">
			<p>
				<a href="index.php?m=content&c=index&a=lists&catid={$catid}" {if !$label} class="active" {/if}>模特风采</a><span>|</span>
				<a href="index.php?m=content&c=index&a=lists&catid={$catid}&label=1" {if $label == 1} class="active" {/if}>超级女模</a><span>|</span>
				<a href="index.php?m=content&c=index&a=lists&catid={$catid}&label=2" {if $label == 2} class="active" {/if}>超级男模</a><span>|</span>
				<a href="index.php?m=content&c=index&a=lists&catid={$catid}&label=3" {if $label == 3} class="active" {/if}>少儿模特</a>
			</p>
		</div>
		<div class="wrapper">			
			<div class="searchSx">
				<div id="city" data="{$city}">
					<span class="qianaTitle">城市：</span>
					<span value="" {if !$city} class="spans allTj"{else} class="spans"{/if}>ALL</span>
					{pc:content action="getCityletter" city="city"}
					{loop $data $v}
					<span value="{$v}" {if $city == $v} class="spans allTj"{else} class="spans"{/if}>{$v}</span>
					{/loop}
					{/pc}
				</div>
				<div id="people" data="{$people}">
					<span class="qianaTitle">人种：</span>
					<span value=""{if !$people} class="spans allTj"{else} class="spans"{/if}>ALL</span>
					<span value="1" {if $people == 1} class="spans allTj"{else} class="spans"{/if}>中模</span>
					<span value="2" {if $people == 2} class="spans allTj"{else} class="spans"{/if}>外模</span>
				</div>
				<div class="zmpl" id="letter" data="{$letters}">
					<span class="qianaTitle">字母表：</span>
					<span value="" {if !$letters} class="spans allTj"{else} class="spans"{/if}>ALL</span>
					{pc:content action="getCityletter" catid="$catid"}
					{loop $data $v}
					{if $v['letter']}
					<span value="{$v['letter']}" {if $letters == $v['letter']} class="spans allTj"{else} class="spans"{/if}>{$v['letter']}</span>
					{/if}
					{/loop}
					{/pc}
				</div>
				<div style="height:.35rem;">
					<span class="searchwenzi qianaTitle">搜索：</span>
					<div class="searchB">
						<input type="text" value="{$title}" class="Wk" name="title" id="title">
						<input type="submit" value="" class="s_btn" name="" id="click_submit">
					</div>
				</div>
			</div>

			
			<div class="moteH5 clear">
				{pc:content  action="lists" catid="$catid" wheres="$where" page="$page" num="10" type="4" siteid="1"}
				<div class="model-list">
					<ul class="sis-li" id="sis-li">
					{loop $data['talentList'] $key $val}
						<li>
							<span class="v1">
								<a href="/index.php?m=content&c=index&a=show&type=4&catid={$catid}&id={$val['id']}">
									<img src="{$val[imageVertical]}">
									<p>{$val[realName]}</p>
								</a>
							</span>
						</li>
						{/loop}
					</ul>
				</div>
				
				<div class="clear"></div>	
				<!-- <div class="Ppage">
					{$front_pages}
				</div> -->
				{/pc}
			</div> 	

		</div>
		{template "content_h5","footer_index"}
	</body>
</html>